package org.jeecg.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.domain.Appraise;
import org.jeecg.domain.dto.AppraiseDto;
import org.jeecg.domain.vo.AppraiseVo;
import org.jeecg.service.AppraiseService;
import org.jeecg.mapper.AppraiseMapper;
import org.jeecg.util.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author ASUS
* @description 针对表【appraise】的数据库操作Service实现
* @createDate 2024-12-29 18:48:15
*/
@Service
public class AppraiseServiceImpl extends ServiceImpl<AppraiseMapper, Appraise>
    implements AppraiseService{
    @Autowired
    private AppraiseMapper appraiseMapper;
    @Override
    public ResponseResult findAll(AppraiseDto appraiseDto) {
        Page<AppraiseVo> page=new Page<>(appraiseDto.getPageNum(),appraiseDto.getPageSize());
        List<AppraiseVo> all = appraiseMapper.findAll(appraiseDto, page);
        page.setRecords(all);
        page.setTotal(all.size());
        return ResponseResult.okResult(page);
    }
}




